<template>
  <el-form :model="dom" label-width="80px">
    <el-form-item label="图层">
      <el-input-number v-model.number="dom.sort" disabled></el-input-number>
    </el-form-item>
    <el-form-item label="类型">
      <el-input value="视频元素" disabled style="width: 130px"></el-input>
    </el-form-item>
    <el-form-item label="距左">
      <el-input-number v-model.number="dom.left"></el-input-number>
    </el-form-item>
    <el-form-item label="距顶">
      <el-input-number v-model.number="dom.top"></el-input-number>
    </el-form-item>
    <el-form-item label="宽度">
      <el-input-number v-model.number="dom.width"></el-input-number>
    </el-form-item>
    <el-form-item label="高度">
      <el-input-number v-model.number="dom.height"></el-input-number>
    </el-form-item>
    <el-form-item label="Index">
      <el-input-number v-model.number="dom.index"></el-input-number>
    </el-form-item>
    <el-form-item label="" label-width="15px">
      <div style="color: #606266">视频地址</div>
      <el-input
        v-model.trim="dom.link"
        resize="none"
        type="textarea"
        style="width: 200px"
      ></el-input>
    </el-form-item>
    <el-form-item label="添加图片">
      <el-button type="primary" round @click="handleImageEdit">
        添加/修改图片
      </el-button>
    </el-form-item>
    <!-- <ImageEdit only="link_image" ref="image-edit" /> -->
  </el-form>
</template>

<script>
  import mixin from '@/views/editor/mixin.js'
  // import ImageEdit from './ImageEdit'
  export default {
    name: 'VideoForm',
    components: {
      // ImageEdit,
    },
    mixins: [mixin],
    data() {
      return {
        root: {
          dom: {},
        },
      }
    },
    computed: {
      dom() {
        return this.root.dom || {}
      },
    },
    methods: {
      handleImageEdit() {
        this.root.$refs['image-edit'].showEdit()
      },
    },
  }
</script>
